Skip to content

fix: absolute path resolution for directory flag (fixes #55)#56

Merged
LucDeCaf merged 2 commits into
powersync-ja:mainfrom
Ishant5436:fix-directory-path
Jul 6, 2026
Merged

fix: absolute path resolution for directory flag (fixes #55)#56
LucDeCaf merged 2 commits into
powersync-ja:mainfrom
Ishant5436:fix-directory-path

Conversation

@Ishant5436

@Ishant5436 Ishant5436 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes an issue where providing an absolute path to the --directory flag incorrectly appended the absolute path to the current working directory.

Changes

  • src/utils.ts: updated resolveProjectDir to use path.resolve for proper absolute path resolution
  • src/commands/pull/instance.ts: updated the log message to print the actual projectDir instead of the raw flag value

Testing

  • Local execution confirms that --directory /absolute/path resolves correctly
  • Existing unit tests pass successfully

Closes #55

@CLAassistant

CLAassistant commented Jun 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@stevensJourney stevensJourney left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I still have to test this locally, but generally the change seems good to me.

Can you please add a Changeset for this change via pnpm changeset add and also sign the CLA. Thanks!

@Ishant5436

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@Ishant5436

Copy link
Copy Markdown
Contributor Author

hey @stevensJourney, I already pushed the changeset in a subsequent commit! Let me know if everything looks good on your end when you test locally. Also just left a comment signing the CLA.

@LucDeCaf

LucDeCaf commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Hey @Ishant5436, thanks for taking the time to contribute!

We use a tool https://cla-assistant.io to help us manage the CLA signing, and checks will fail until the CLA is signed on that platform specifically. You can sign it using this link (https://cla-assistant.io/powersync-ja/powersync-cli?pullRequest=56) or by clicking the link in the comment left by @CLAassistant. Thanks again!

@Ishant5436 Ishant5436 changed the title fix --directory absolute path resolution in powersync pull instance fix: absolute path resolution for directory flag in pull instance Jun 11, 2026
@Ishant5436 Ishant5436 changed the title fix: absolute path resolution for directory flag in pull instance fix: absolute path resolution for directory flag (fixes #55) Jun 13, 2026
@Ishant5436

Copy link
Copy Markdown
Contributor Author

@LucDeCaf I have signed the CLA through the portal and the checks are showing as green now! Let me know if there's anything else needed.

@LucDeCaf

Copy link
Copy Markdown
Contributor

@Ishant5436 Everything looks good to me - I'll merge once I've gotten around to smoke-testing the changes on my machine. :)

@Ishant5436

Copy link
Copy Markdown
Contributor Author

Hi there! Just checking in on this—is there anything else needed from my side before this can be reviewed and merged? Thanks!

@LucDeCaf

LucDeCaf commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Hey @Ishant5436 - nothing is needed on your side, things have just been busy on mine.

@LucDeCaf
LucDeCaf merged commit 0eaf362 into powersync-ja:main Jul 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--directory with an absolute path writes files to the wrong location (concatenated with cwd) in powersync pull instance

4 participants